package 写入;

import java.util.ArrayList;
import java.util.Collection;

/**
 * @author Administrator
 * @ClassName Test
 * @TIME 星期一 2020/12/28
 */
public class Test {
    public static void main(String[] args) {
        double read = System.currentTimeMillis();
        Collection ct = new ArrayList();
        ct.add("Hello");
        ct.add("World");
        ct.add("Java Yes");

        System.out.println(ct.size());
        System.out.println(ct.isEmpty());
        System.out.println(ct.contains("Hello"));
        System.out.println(ct.toArray());
        ct.remove("Hello");
        Object[] objArr = ct.toArray();
        for (Object obj : objArr) {
            System.out.println(obj);
        }
        ct.clear();
        double start = System.currentTimeMillis();
        System.out.println(start - read + "ms");
    }
}
